<MDXHeader
  title="Grid"
  description="Creates a grid layout to align components as equally sized columns."
/>

<ComponentPreview name="grid-demo" />

## Installation

<Tabs defaultValue="cli">

<TabsList>
  <TabsTrigger value="cli">CLI</TabsTrigger>
  <TabsTrigger value="manual">Manual</TabsTrigger>
</TabsList>

<TabsContent value="cli">

```bash
npx solidui-cli@latest add grid
```

</TabsContent>

<TabsContent value="manual">

<Step>Copy and paste the following code into your project: </Step>

<ComponentSource name="grid" />

</TabsContent>

</Tabs>

## Usage

```tsx
import { Col, Grid } from "~/components/ui/grid"
```

```tsx
<Grid cols={1} colsMd={2} class="w-full gap-2">
  <Col span={1} spanMd={2}>
    <Card>
      <CardHeader>
        <CardTitle>Title</CardTitle>
      </CardHeader>
      <CardContent>KPI 1</CardContent>
    </Card>
  </Col>
  <Card>
    <CardHeader>
      <CardTitle>Title</CardTitle>
    </CardHeader>
    <CardContent>KPI 2</CardContent>
  </Card>
  <Card>
    <CardHeader>
      <CardTitle>Title</CardTitle>
    </CardHeader>
    <CardContent>KPI 3</CardContent>
  </Card>
</Grid>
```
